package com.frogs.ucenter.dao.ibatis;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

import com.frogs.framework.base.dao.ibatis.BaseDaoIbatis;
import com.frogs.framework.util.PageList;
import com.frogs.ucenter.dao.InsuranceRecordDao;
import com.frogs.ucenter.entity.InsuranceRecord;
import com.frogs.ucenter.entity.InsuranceRecordJoinInsuranceInfoExt;
import com.frogs.ucenter.entity.InsuranceRecordJoinInsuranceUserExt;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository("insuranceRecordDao")
public class InsuranceRecordDaoImpl extends BaseDaoIbatis<InsuranceRecord> implements InsuranceRecordDao {

    public InsuranceRecordDaoImpl() {
        super();
        setNameSpace( "insurance_record" );
    }

    @Required
    @Autowired
    public void setSqlMapClientAutowired(SqlMapClient sqlMapClient) {
        super.setSqlMapClient( sqlMapClient );
    }
    
    
    @Override
    public PageList<InsuranceRecordJoinInsuranceInfoExt> selectJoinByMap(Map<String, Object> params, int pageNo, int pageSize, boolean doCount) {
        return (PageList<InsuranceRecordJoinInsuranceInfoExt>) queryforPageList(getNameSpace() + ".selectJoinByMap", params, pageNo, pageSize, doCount);
    }
    
    @Override
	public InsuranceRecordJoinInsuranceUserExt selectInsuranceRecordJoinInsuranceUserById(Object id) {
		return (InsuranceRecordJoinInsuranceUserExt) getSqlMapClientTemplate().queryForObject(getNameSpace() + ".selectInsuranceRecordJoinInsuranceUserById", id);
		
	}
}